package com.peakmain.wanandroid.projectmodule.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.peakmain.baselibrary.recyclerview.adapter.CommonRecyclerAdapter;
import com.peakmain.baselibrary.recyclerview.adapter.ViewHolder;
import com.peakmain.baselibrary.recyclerview.loader.GlideImageLoader;
import com.peakmain.wanandroid.netmodule.bean.project.ProjectListBean;
import com.peakmain.wanandroid.projectmodule.R;

import java.util.List;

/**
 * author ：Peakmain
 * createTime：2019/7/13
 * mail:2726449200@qq.com
 * describe：
 */
public class ProjectListAdapter extends CommonRecyclerAdapter<ProjectListBean.DatasBean> {
    public ProjectListAdapter(Context context, List<ProjectListBean.DatasBean> data) {
        super(context, data, R.layout.recyclerview_project_list);
    }
    @Override
    public void convert(ViewHolder holder, ProjectListBean.DatasBean item) {
        holder.setText(R.id.tv_name,item.getAuthor());
        holder.setText(R.id.tv_desc,item.getDesc());
        holder.setText(R.id.tv_data,item.getNiceDate());
        holder.setText(R.id.tv_title,item.getTitle());
        holder.setImageByUrl(R.id.iv_pic, new GlideImageLoader(item.getEnvelopePic()));
    }
}
